<template>
  <div class="img_message">
    <div>
      <img src="../assets/success.png">
      <h1 class="exchange">未知错误</h1>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'SuccessNormal',
    methods:{
      Submit(){
        var symptom = localStorage.getItem('symptom');
        var pic = localStorage.getItem('pic');
        var oName = localStorage.getItem('oName');
        var oNow = localStorage.getItem('oNow');
        var oBirthday = localStorage.getItem('oBirthday');
        var oWei = localStorage.getItem('oWei');
        var oRadio = localStorage.getItem('oRadio');
        var oTextarea1 = localStorage.getItem('oTextarea1');
        var oTextarea2 = localStorage.getItem('oTextarea2');
        var opid =localStorage.getItem('Opid');
        this.$ajax.post('http://47.75.110.31:8080/orinfo/addOne?opid=' + opid + '&patientname=' + oName + '&sex=' + oRadio + '&birthday=' + oBirthday + '&weight=' + oWei + '&history=' + oTextarea1 + '&symptom=' + symptom + '&past=' + oTextarea2 + '&picture=' + pic + '&times=' + oNow + '&status=0&doctor=1',
          {
            headers: {
              'Content-Type': 'application/json;charset=UTF-8'
            }
          }
        ).then(response => {
          console.log(response.data);
          alert('恭喜您提交成功');
          localStorage.clear();
          window.close();
        })
      }
    },
    created () {
      this.Submit();
    }
  }
</script>

<style scoped>
  .img_message {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .exchange {
    padding-left: 40px;
  }
</style>
